﻿@using Coslen.Framework.Helpers
@model Coslen.TahorCRM.Domain.Model.Entities.ContactRelationship


<div class="history_DisplayLine">
    <div class="info">
        @Html.HiddenFor(model => model.ContactRelationId)
        @Html.DisplayFor(model => model.SecondaryContact.LastName), @Html.DisplayFor(model => model.SecondaryContact.Title.Name) @Html.DisplayFor(model => model.SecondaryContact.FirstName)
        
    </div>
    <div class="type">
        @Html.DisplayFor(model => model.ContactRelationshipType.Name)
    </div>
    <div class="tool">
        @if (User.IsInRole("CanEditContact"))
        {
            @Html.ImageActionLink(
                Url.Content("~/Content/Images/edit.png"),
                "Edit",
                "Edit",
                "ContactRelationship",
                new {area = "Contacts", id = Model.ContactRelationId, source = "Contact:Details:" + Model.PrimaryContactId},
                new {@class = ""},
                new {@class = "actionIcon"})

            @Html.ImageActionLink(
                Url.Content("~/Content/Images/delete.png"),
                "Delete",
                "Delete",
                "ContactRelationship",
                new {area = "Contacts", id = Model.ContactRelationId, source = "Contact:Details:" + Model.PrimaryContactId},
                new {@class = ""},
                new {@class = "actionIcon"})
        }
        
    </div>
</div>